var {Crypto} = require('@/common/cryptojs-master/cryptojs.js');
// 解密微信手机号
export function CryptoencryptedData(encryptedData, iv,sessionKey) {
 console.log(Crypto,'俺也不知道这是啥')
 var encryptedData = Crypto.util.base64ToBytes(encryptedData)
 // console.log(sessionKey)
 var key = Crypto.util.base64ToBytes(sessionKey);
 var iv = Crypto.util.base64ToBytes(iv);
 // console.log(encryptedData,key,iv)
 // 对称解密使用的算法为 AES-128-CBC，数据采用PKCS#7填充
 var mode = new Crypto.mode.CBC(Crypto.pad.pkcs7);
 try {
  // 解密
  var bytes = Crypto.AES.decrypt(encryptedData, key, {
   asBpytes: true,
   iv: iv,
   mode: mode
  });
  console.log(bytes,'解密')
  var decryptResult = JSON.parse(bytes);

 } catch (err) {
  console.log(err,'错误信息')
 }
 if (decryptResult.watermark.appid !== 'wxf19c9c11e4735cad') {
  // console.log(err)
 }
 return decryptResult
}